{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h1>\n",
    "    <center>\n",
    "        <a href=\"../desktop\" target=\"_blank\">\n",
    "        <img src=\"https://www.slicer.org/assets/img/3D-Slicer-Mark.svg\" width=\"100\" height=\"100\"/>\n",
    "        <br>Click here to open 3D Slicer in a new window</a>\n",
    "    </center>\n",
    "</h1>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "        <iframe\n",
       "            width=\"960\"\n",
       "            height=\"768\"\n",
       "            src=\"/desktop/\"\n",
       "            frameborder=\"0\"\n",
       "            allowfullscreen\n",
       "        ></iframe>\n",
       "        "
      ],
      "text/plain": [
       "<JupyterNotebooksLib.widgets.AppWindow object at 0x7f0e1ef6eeb8>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Run this cell (Shift+Enter) to show application here\n",
    "import JupyterNotebooksLib as slicernb\n",
    "slicernb.AppWindow(contents='full')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "ac447fcf52b04a27b957f43a4f3ece15",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "IntProgress(value=0)"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Run this cell to load a file from a URL.\n",
    "# You can load your own data by changing inputs of downloadFromURL.\n",
    "# Any questions? Write us on the Slicer forum: https://discourse.slicer.org\n",
    "slicer.mrmlScene.Clear()\n",
    "\n",
    "volume = slicernb.downloadFromURL(\n",
    "    uris=\"https://github.com/Slicer/SlicerTestingData/releases/download/MD5/39b01631b7b38232a220007230624c8e\",\n",
    "    fileNames=\"MRHead.nrrd\",\n",
    "    nodeNames=\"Volume\")\n",
    "\n",
    "slicernb.showVolumeRendering(volume)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Slicer 4.13",
   "language": "python",
   "name": "slicer-4.13"
  },
  "language_info": {
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
